package top.blackr.folivora.common.security.crud.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = true)
public class SysUser extends Model<SysUser> {

    @TableId
    private Long userId;
    @Schema(description = "用户名")
    private String username;
    @Schema(description = "密码")
    private String password;
    @Schema(description = "加密盐")
    private String salt;
    @Schema(description = "手机号")
    private String phone;
    @Schema(description = "微信openId")
    private String wxOpenid;
    @Schema(description = "微信unionId")
    private String wxUnionid;
    @Schema(description = "小程序openId")
    private String miniOpenid;
    @Schema(description = "QQ openId")
    private String qqOpenid;
    @Schema(description = "码云 标识")
    private String giteeLogin;
    @Schema(description = "开源中国 标识")
    private String oscId;
    @Schema(description = "锁定标记：1锁定；0未锁定")
    private String lockFlag;
    @Schema(description = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    @Schema(description = "删除标记：1删除；0未删除")
    @TableField(value = "del_flag",fill = FieldFill.INSERT)
    private String delFlag;

}
